<template >

  <!-- 你的内容 -->
<div style="height:100%;width:100%">

<div id="mySwagger" style="width:100%;height:100%;overflow-y: scroll;overflow-x: hidden;">

</div>

</div>


</template>

<script>
//import SwaggerUI from 'swagger-ui'
// or use require if you prefer
import 'swagger-ui-dist/swagger-ui.css'
import { SwaggerUIBundle,SwaggerUIStandalonePreset } from 'swagger-ui-dist'
import { mapState } from 'vuex'
export default{
    
    name:'Swagger',
    mounted(){
        this.__init()
    },
    computed:{
        ...mapState('userAbout',['token'])
    },
    methods:{
        __init(){
            const ui = SwaggerUIBundle({
    url: `http://localhost:9001/v2/api-docs?yToken=${this.token}`,
    dom_id: '#mySwagger',
    presets: [
      SwaggerUIBundle.presets.apis,
      SwaggerUIStandalonePreset
    ],
    layout: "StandaloneLayout",
    docExpansion:'none'
  })
        },
        _import_(src){
        
        }
    }
}
 </script>

<style>

</style>